package per.hx.bs.entity.sys;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import per.hx.bs.base.entity.BaseEntity;

import java.io.Serializable;

/**
 * @author HuXing
 * @date 2018/3/24  0:07
 */
@TableName("sys_file")
public class SysFileDO extends BaseEntity<SysFileDO> {

    @TableId
    private Long id;
    /**
     * 文件类型
     */
    private Integer type;
    /**
     * URL地址
     */
    private String url;


    private String fileName;

    public SysFileDO() {
        super();
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public SysFileDO(Integer type, String url) {

        this.type = type;
        this.url = url;
    }

    public SysFileDO(Integer type, String url, String fileName) {
        this.type = type;
        this.url = url;
        this.fileName = fileName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "SysFileDO{" +
                "id=" + id +
                ", type=" + type +
                ", url='" + url + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
